package com.heatup.apt.management.service.course;

import com.heatup.apt.model.Resource;
import com.heatup.apt.model.api.ResourceModel;
import com.heatup.apt.model.course.CourseStandard;

import java.util.List;
import java.util.Map;

/**
 * Created by b3st9u on 16/9/22.
 */
public interface CourseStandardService {
    /**
     * 查询标准课程库
     *
     * @return
     */
    Map<String, Object> queryCourseBaseList(int page, int limit);

    /**
     * 根据I查询标准课程库
     *
     * @param courseStandardId
     * @return
     */
    CourseStandard queryCourseStandardById(int courseStandardId);

    /**
     * 根据Id查询资源文件
     * @param courseStandardId
     * @return
     */
    List<Resource> queryCourseStandardResourceById(int courseStandardId);

    /**
     * 删除
     *
     * @param courseStandardId
     * @return
     */
    int delCourseStandardById(int courseStandardId);

    /**
     * 更新
     *
     * @param courseStandard
     * @return
     */
    int updateCourseStandard(CourseStandard courseStandard);

    /**
     * 新增标准课程
     * @param courseStandard
     * @return
     */
    int insertCourseStandard(CourseStandard courseStandard);

    /**
     * 查询所有正常课程
     * @return
     */
    List<CourseStandard> queryAllCourseStandard();

    /**
     * 根据课程Id查询资源
     * @param courseStandardId
     * @return
     */
    public Map<String, List<ResourceModel>> selectResourceByCourseId(int courseStandardId);

    /**
     * 根据课程ID 查询标准课程关联资源
     * @param id
     * @return
     */
    CourseStandard queryCourseStandardWithResourceById(int id);

    /**
     * 标准课程保存
     * @param courseStandard
     * @return
     */
    boolean saveCourseStandard(CourseStandard courseStandard);

    /**
     * 分页查询标准课程
     * @param paramsMap
     * @return
     */
    Map<String,Object> queryCourseStandardList(Map<String, Object> paramsMap);

    /**
     * 查询标准课程 ID NAME LIST
     *
     * @return
     */
    List<CourseStandard> queryAllCourseStandardIdAndName();
}
